package spider.netty.entity;

import java.io.Serializable;

/**
 * Message
 *
 * @author Archx[archx@foxmail.com]
 * @date 2017/4/8.
 */
public class Message implements Serializable {
    private static final long serialVersionUID = 8509612453608394629L;

    /**
     * 用户标识
     */
    private String uid;

    /**
     * 接受者标识
     */
    private String targetUid;

    /**
     * 动作
     */
    private Action action = Action.None;

    /**
     * 消息
     */
    private String message;

    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public String getTargetUid() {
        return targetUid;
    }

    public void setTargetUid(String targetUid) {
        this.targetUid = targetUid;
    }

    public Action getAction() {
        return action;
    }

    public void setAction(Action action) {
        this.action = action;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public enum Action {
        None, // 未知
        Login, // 登陆
        Talk, // 交流
        Broadcast // 广播
    }

}
